<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${goodsSpike.id}"  type="hidden">

							<div class="form-group">
								<label class="col-sm-3 control-label">类型：</label>
								<div class="col-sm-8">
									<select id = "type" name="type" style="width: 80%;height: 30px">
										<option value="0" th:selected="${goodsSpike.type==0}">秒杀专区</option>
										<option value="1" th:selected="${goodsSpike.type==1}">主推专区</option>
										<option value="2" th:selected="${goodsSpike.type==2}">福利专区</option>
										<!--<option value="4" th:selected="${cmsSlide.type==4}">最新活动</option>
										<option value="3" th:selected="${cmsSlide.type==3}">加入我们</option>
										<option value="5" th:selected="${cmsSlide.type==5}">分享海报图</option>-->
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">时间段：</label>
								<div class="col-sm-8">
									<select id = "timeId" name="timeId" style="width: 80%;height: 30px">
										<option th:each="times : ${timeList}"
												th:value="${times.id}"
												th:text="${times.name}"
												th:selected="${times.id==goodsSpike.timeId}">
										</option>
									</select>
								</div>
							</div>
							<!--<div class="form-group">
								<label class="col-sm-3 control-label">开始时间：</label>
								<div class="col-sm-8">
									<input id="startAt" name="startAt" th:value="${#dates.format(goodsSpike.startAt, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">结束时间：</label>
								<div class="col-sm-8">
									<input id="endAt" name="endAt" th:value="${#dates.format(goodsSpike
									.startAt, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">
								</div>
							</div>-->
							<div class="form-group">
								<label class="col-sm-3 control-label">跳转商品：</label>
								<div class="col-sm-8">
									<select data-placeholder="--选择商品别--" name="goodsId" id="goodsId"
											class="form-control chosen-select" tabindex="2" required>
										<option value="">--选择类别商品--</option>
										<option th:each="goods : ${goodsList}"
												th:value="${goods.id}"
												th:text="${goods.name}"
												th:selected="${goods.id==goodsSpike.goodsId}"
												th:data-price="${goods.price}"
												 th:data-priceC="${goods.price_c}"
												th:data-priceZ="${goods.price_z}"
												th:data-priceG="${goods.price_g}"
<!--												th:data-rebateOne="${goods.rebate_one}"-->
<!--                                       			 th:data-rebateTwo="${goods.rebate_two}"-->
												th:data-stock="${goods.stock}"></option>
									</select>
								</div>
							</div>
							<div id="one" class="form-group">
								<label class="col-sm-3 control-label">原商品用户价格：</label>
								<div class="col-sm-8">
									<input id="oldPrice" name="oldPrice" th:value="${oldMap.price}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>

							 <div id="oneC" class="form-group" >
								<label class="col-sm-3 control-label">原商品团长价：</label>
								<div class="col-sm-8">
									<input id="oldPriceC" name="oldPriceC" th:value="${oldMap.price_c}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>
							<div id="oneZ" class="form-group" >
								<label class="col-sm-3 control-label">原商品核心价：</label>
								<div class="col-sm-8">
									<input id="oldPriceZ" name="oldPriceZ" th:value="${oldMap.price_z}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>
							<div id="oneG" class="form-group" >
								<label class="col-sm-3 control-label">原商品合伙人价：</label>
								<div class="col-sm-8">
									<input id="oldPriceG" name="oldPriceG" th:value="${oldMap.price_g}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>
							<div id="oneCC" class="form-group" >
								<label class="col-sm-3 control-label">原商品接单价：</label>
								<div class="col-sm-8">
									<input id="oldRebateOne" name="oldRebateOne" th:value="${oldMap.rebate_one}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>
							<!--<div id="oneGG" class="form-group">
								<label class="col-sm-3 control-label">原商品高级分销自反金额：</label>
								<div class="col-sm-8">
									<input id="oldRebateTwo" name="oldRebateTwo" th:value="${oldMap.rebate_two}" class="form-control" type="text" disabled="disabled">
								</div>
							</div> -->

							<div id="two" class="form-group">
								<label class="col-sm-3 control-label">原商品库存：</label>
								<div class="col-sm-8">
									<input id="oldStock" name="oldStock" th:value="${oldMap.stock}" class="form-control" type="text" disabled="disabled">
								</div>
							</div>


							<div class="form-group">
								<label class="col-sm-3 control-label">专区用户价格：</label>
								<div class="col-sm-8">
									<input id="price" th:value="${goodsSpike.price}" name="price" class="form-control" type="text">
								</div>
							</div>

							 <div class="form-group">
								<label class="col-sm-3 control-label">专区团长价：</label>
								<div class="col-sm-8">
									<input id="priceC" th:value="${goodsSpike.priceC}" name="priceC" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">专区核心价：</label>
								<div class="col-sm-8">
									<input id="priceZ" th:value="${goodsSpike.priceZ}" name="priceZ" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">专区合伙人价：</label>
								<div class="col-sm-8">
									<input id="priceG" th:value="${goodsSpike.priceG}" name="priceG" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">专区接单价：</label>
								<div class="col-sm-8">
									<input id="rebateOne" th:value="${goodsSpike.rebateOne}" name="rebateOne" class="form-control" type="text">
								</div>
							</div>
							<!--<div class="form-group">
								<label class="col-sm-3 control-label">专区高级分销自反金额：</label>
								<div class="col-sm-8">
									<input id="rebateTwo" th:value="${goodsSpike.rebateTwo}" name="rebateTwo" class="form-control" type="text">
								</div>
							</div> -->
							<div class="form-group">
								<label class="col-sm-3 control-label">库存：</label>
								<div class="col-sm-8">
									<input id="stock" th:value="${goodsSpike.stock}" placeholder="该库存不能超过原商品库存" name="stock" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/css/plugins/laydate/laydate.js"></script>
	<script src="/js/bootstrap.min.js?v=3.3.6"></script>
	<script src="/js/layui.js"></script>
	<script th:inline="javascript">
		var oldStock = [[${oldMap.stock}]];
	</script>
	<script type="text/javascript" src="/js/appjs/wx/goodsSpike/edit.js">
	</script>
</body>
</html>
